package org.flint92.springcloud.config.client.controller;

import org.flint92.springcloud.config.client.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author flint92
 */
@RestController
public class UserController {

    private final User user;

    @Autowired  // 构造器注入
    public UserController(User user) {
        this.user = user;
    }

    @GetMapping("/user")
    public User getUser() {
        return user;
    }

}
